package main

import (
	"fmt"
)

type Inter interface {
	Ping()
	Pong()
}

type Anter interface {
	Inter
	String()
}

type St struct {
	Name string
}

func (St) Ping() {
	fmt.Println("Ping")
}

func (St) Pong() {
	fmt.Println("Pong")
}

func (s St) String() {
	fmt.Println(s.Name)
}

func main() {
	st := St{Name: "yyt"}
	var i interface{} = st

	o := i.(Inter)
	o.Ping()
	o.Pong()

	if p, ok := i.(Anter); ok {
		p.String()

		var a Inter = p
		a.Ping()
	}
}
